EMT Practice Test

1. Question Content...


Question List

Question1: The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below:
WORK.EMPLOYEE WORK.SALARY
fname age fname salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;
merge work.employee
work.salary;
by fname;
totsal + salary;
run;
How many variables are output to the WORK.EMPDATA data set?

Question2: The following SAS program is submitted:
data combine;
prefix='505';
middle='6465 ';
end='09090';
<insert statement here>;
run;
Which statement successfully completes the program so that TOTAL has a value of 505-6465-
09090?

Question3: The following program is submitted:
proc contents data=_all_;
Which statement best describes the output from the submitted program?

Question4: The SAS data set WORK.AWARDS is listed below:
fname points
Amy 2
Amy 1
Gerard 3
Wang 3
Wang 1
Wang 2
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
Which one of the following represents how the observations are sorted?

Question5: Which statement specifies that records 1 through 10 are to be read from the raw data file customer.txt?

Question6: The following SAS program is submitted:

How many raw data records are read during each iteration of the DATA step?

Question7: What is the purpose or the MISSOVER option on the INFILE statement?

Question8: The following code was modified to generate the results further below:
proc format;
value agegrp
low-12 ='Pre-Teen'
13-high = 'Teen';
run;
proc means data=SASHELP.CLASS;
var Height;
class Sex Age;
format Age agegrp.;
run;
The following results were generated to display only specific statistics and limit the decimals with the
modification: Which statement below was modified or added to generate the results above:

Question9: The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently
ordered by Department.
The following SAS program is submitted:

What is the value of the variable Total before the first iteration of the data step?

Question10: Given the following SAS data set WORK.SALES:

The following SAS program is submitted:

Which output is produced?
A:

B:

C:

D:

Question11: Read the table:

Given the SAS data set SASUSER.HOUSES:
Obs style bedrooms baths price sqteet street
1 CONDO 2 1.5 80050 1200 MAIN
2 CONDO 3 2.5 79350 1300 ELM
3 CONDO 4 2.5 127150 1400 OAK
4 CONDO 2 2.0 110700 1100 FIFTH
5 TWOSTORY 4 3.0 107250 2100 SECOND
6 TWOSTORY 2 1.0 55650 1600 WEST
7 TWOSTORY 2 1.0 69250 1450 NORTH
6 TWOSTORY 4 2.5 102950 2000 SOUTH
The following SAS program is submitted:
proc report data = sasuser.houses nowd headline;
column style price;
where price It 100000;
<insert DEFINE statement here>
define price / mean width = 9 format = dollar12.;
title;
run;
The following output is desired:
style price
------- ------
CONDO $79,700
TWOSTORY $62550
Which DEFINE statement completes the program and produces the desired output?

Question12: There are 451 observations in the data set WORK.STAFF. The following SAS program is submitted:

What will be the value of NewVar when SAS writes the last observation?

Question13: Given the following data set WORK.TOYS:

The following SAS program s submitted:
data WORK.GROUPS;
set WORK.TOYS;
if Product="Cards" then Group_Desc="Indoors";
else if Product in ("Drum", "Recorder") then Group_Desc="Instruments";
else if Product="Ball" then Group_Desc="Outdoors";
run;
proc print data=WORK.GROUPS noobs;
run;
Which output is produced?
A:

B:

C:

D:

Question14: The SAS data set named WORK.TEST is listed below:
capacity airplanetype staff
150 Large 10
Which one of the following SAS programs created this data set?

Question15: The following SAS program is submitted:
proc freq data = class;
tables gender * age / <insert option here>;
run;
The following report is created:
The FREQ Procedure
Table of gender by age
Row Column
Gender age Frequency Percent Percent Percent
F 11 1 10.00 20.00 50.00
12 2 20.00 40.00 40.00
13 2 20.00 40.00 66.67
Total 5 50.00 100.00
M 11 1 10.00 20.00 50.00
12 3 30.00 60.00 60,00
13 1 10.00 20.00 33.33
Total 5 50.00 100.00
Total 11 2 20.00 100.00
12 5 50.00 100.00
13 3 30.00 100.00
Total 10 100.00
Which option correctly completes the program and creates the report?

Question16: The following SAS program is submitted:
data work.passengers;
if OrigPassengers = . then'
OrigPassengers = 100;
TransPassengers = 100;
OrigPassengers = .;
TotalPassengers = sum (OrigPassengers, TransPassengers) +0;
run;
What is the value of the TOTALPASSENGERS variable in the output data set?

Question17: The following SAS program is submitted:
data work.retail;
cost = '20000';
total = .10 * cost;
run;
Which one of the following is the value of the variable TOTAL in the output data set?

Question18: Given the raw data file AMOUNT:
----I---- 10---I----20---I----30
$1,234
The following SAS program is submitted:
data test;
infile 'amount';
input@1 salary 6.;
if_error_then description = 'Problems';
else description = 'No Problems';
run;
What is the result?

Question19: The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City_Country = substr(First,1,7)!!', '!!'England';
run;
Which one of the following is the length of the variable CITY_COUNTRY in the output data set?

Question20: A raw data file is listed below:
RANCH,1250,2,1,Sheppard Avenue,"$64,000"
SPLIT,1190,1,1,Rand Street,"$65,850"
CONDO,1400,2,1.5,Market Street,"80,050"
TWOSTORY,1810,4,3,Garris Street,"$107,250"
RANCH,1500,3,3,Kemble Avenue,"$86,650"
SPLIT,1615,4,3,West Drive,"94,450"
SPLIT,1305,3,1.5,Graham Avenue,"$73,650"
The following SAS program is submitted using the raw data file as input:
data work.condo_ranch;
infile 'file-specification' dsd;
input style $ @;
if style = 'CONDO' or style = 'RANCH' then
input sqfeet bedrooms baths street $ price : dollar10.;
run;
How many observations does the WORK.CONDO_RANCH data set contain?

Question21: Given the raw data record DEPT:
----|----10---|----20---|----30
Printing 750
The following SAS program is submitted:
data bonus;
infile 'dept';
inputdept$ 1-11 number 13- 15;
<insert statement here>
run;
Which SAS statement completes the program and results in a value of 'Printing750' for the DEPARTMENT
variable?

Question22: The SAS data set WORK.ONE contains a numeric variable named Num and a character variable named
Char:

The following SAS program is submitted:

What is output?

Question23: The following SAS program is submitted:
proc sort data=SASUSER.PROJECTS out=PSORT;
by Product Code descending Date Cost;
run;
Which of the following is true concerning the submitted program?

Question24: The following SAS program is submitted:
data allobs;
set sasdata.origin (firstobs = 75 obs = 499);
run;
The SAS data set SASDATA.ORIGIN contains 1000 observations.
How many observations does the ALLOBS data set contain?

Question25: The following SAS program is submitted:

What is the value of the second variable in the data set WORK.AUTHORS?

Question26: The Excel workbook REGIONS.XLS contains the following four worksheets:
EAST
WEST
NORTH
SOUTH
The following program is submitted:
libname MYXLS 'regions.xls';
Which PROC PRINT step correctly displays the NORTH worksheet?

Question27: The following SAS program is submitted:
proc print data = sasuser.houses;
run;
proc means data = sasuser.shoes;
run;
Which one of the following OPTIONS statements resets the page number to 1 for the second report?

Question28: The following SAS DATA step is submitted:
libname temp 'SAS-data-library';
data temp.report;
set sasuser.houses;
newvar = price * 1.04;
run;
Which one of the following statements is true regarding the program above?

Question29: The following SAS program is submitted:

Which statement is true about the output data set?

Question30: After a SAS program is submitted, the following is written to the SAS log:
105 data WORK.JANUARY;
106 set WORK.ALLYEAR(keep=Product Month Quantity Cost);
107 if Month='JAN' then output WORK.JANUARY;
108 Sales=Cost * Quantity;
109 drop=Month Quantity Cost;
-----
22
ERROR 22-322: Syntax error, expecting one of the following: !,
!!, , *, **, +, -,
,<=, <>, =, >, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR, ^=, |, ||, ~=.
110 run;
What data set option could be attached to WORK.JANUARY to replace the DROP statement that
generated the error in the log?

Question31: The following SAS program is submitted:
footnote1 'Sales Report for Last Month';
footnote2 'Selected Products Only';
footnote3 'All Regions';
footnote4 'All Figures in Thousands of Dollars';
proc print data = sasuser.shoes;
footnote2 'All Products';
run;
Which footnote(s) is/are displayed in the report?

Question32: The following SAS program is submitted:
data WORK.PRODUCTS;
Prod=1;
do while (Prod LE 7);
Prod + 1;
end;
run;
What is the value of the variable Prod in the output data set?

Question33: The following SAS program is submitted:
data ONE TWO SASUSER.TWO
set SASUSER.ONE;
run;
Assuming that SASUSER.ONE exists, how many temporary and permanent SAS data sets are created?

Question34: Given the SAS data set WORK.TEMPS with numeric variables Day and Temp and character variable
Month:

The following SAS program is submitted:
proc sort data=WORK.TEMPS;
by Day descending Month;
run;
proc print data=WORK.TEMPS;
run;
Which output is correct?
A:

B:

C:

D:

Question35: The contents of the raw data file CALENDAR are listed below:
--------10-------20-------30
01012000
The following SAS program is submitted:
data test;
infile 'calendar';
input @1 date mmddyy10.;
if date = '01012000'd then event = 'January 1st';
run;
Which one of the following is the value of the EVENT variable?

Question36: The following SAS program is submitted:

The program fails execution due to syntax errors. What is the cause of the syntax error?

Question37: The SAS data set Fed.Banks contains a variable Open_Date which has been assigned a permanent label
of "Open Date". Which SAS program temporarily replaces the label "Open Date" with the label "Starting
Date" in the output?

Question38: Given the SAS data set WORK. PRODUCTS:

The following SAS program is submitted:
data WORK. REVENUE (drop=Sales Returns);
set WORK. PRODUCTS (keep=ProdId Price Sales Returns);
Revenue-Price* (Sales-Returns);
run;
How many variables does the WORK.REVENUE data set contain?

Question39: The contents of the raw data file EMPLOYEE are listed below:
--------10-------20-------30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
infile 'employee';
input employee_name $ 1-4;
if employee_name = 'Sue' then input age 7-8;
else input idnum 10-11;
run;
Which one of the following values does the variable AGE contain when the name of the employee is
"Sue"?

Question40: A user-defined format has been created using the FORMAT procedure. Where is it stored?

Question41: The following SAS program is submitted:
<_insert_ods_code_>
proc means data=SASUSER.SHOES;
where Product in ('Sandal' , 'Slipper' , 'Boot');
run;
<_insert_ods_code_>
Which ODS statements inserted, respectively, in the two location above creates a report stored in an html
file?

Question42: The following SAS program is submitted:
data work.month;
date = input('13mar2000',date9.);
run;
Which one of the following represents the type and length of the variable DATE in the output data set?

Question43: The SAS data set BANKS is listed below:
BANKS
name rate
FirstCapital 0.0718
DirectBank 0.0721
VirtualDirect 0.0728
The following SAS program is submitted:
data newbank;
do year = 1 to 3;
set banks;
capital + 5000;
end;
run;
Which one of the following represents how many observations and variables will exist in the SAS data set
NEWBANK?

Question44: Which is a valid LIBNAME statement?

Question45: Given the SAS data set WORK.ORDERS:

The variable order_id is numeric; customer is character; and shipped is numeric, contains a SAS date
value, and is shown with the DATE9. format. A programmer would like to create a new variable, ship_note,
that shows a character value with the order_id, shipped date, and customer name. For example, given the
first observation ship_note would have the value "Order 9341 shipped on 02FEB2009 to Josh Martin".
Which of the following statement will correctly create the value and assign it to ship_note?

Question46: Given the following raw data record:
07Jan2005
Which INFORMAT reads this raw data and stores it as a SAS date value?

Question47: The following SAS program is submitted:

What new variables are created?

Question48: Given the following raw data records in DATAFILE.TXT:

Which output is correct based on the submitted program?

Question49: The following SAS program is submitted:
data work.test;
Title = 'A Tale of Two Cities, Charles J.
Dickens';
Word = scan(title,3,' ,');
run;
Which one of the following is the value of the variable WORD in the output data set?

Question50: The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department
then payroll = 0;
payroll + wagerate;
if last.department
run;
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for
each of 5 departments.
What is the result?

Question51: This question will ask you to provide lines of missing code.
The following SAS program is submitted:

Which statement inserted, respectively, in the two locations indicated above create a report stored in a
PDF file?
A:

B:

C:

D:

Question52: The following SAS program is submitted:
proc contents data=_all_;
run;
Which statement best describes the output from the submitted program?

Question53: The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department
then payroll = 0;
payroll + wagerate;
if last.department;
run;
The SAS data set named WORKSALARY contains 10 observations for each department, and is currently
ordered by DEPARTMENT.
Which statement is true?

Question54: The following SAS DATA step is submitted:
data sasdata.atlanta
sasdata.boston
work.portland
work.phoenix;
set company.prdsales;
if region = 'NE' then output boston;
if region = 'SE' then output atlanta;
if region = 'SW' then output phoenix;
if region = 'NW' then output portland;
run;
Which one of the following is true regarding the output data sets?

Question55: Which statement correctly computes the average of four numerical values?

Question56: Given the raw data record in the file phone.txt:

Which SAS statement completes the program and results in a value of "James Stevens" for the
variableFullName?

Question57: The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country = City!!', '!!'England';
run;
Which one of the following is the value of the variable CITY_COUNTRY in the output data set?

Question58: Consider the following data step:

The computed variables City and State have their values assigned using two different methods, a
RETAIN statement and an Assignment statement. Which statement regarding this program is true?

Question59: The following SAS program is submitted:
data work.accounting;
set work.department;
length jobcode $ 12;
jobcode='FAl';
run;
The WORK.DEPARTMENT data set contains a character variable named JOBCODE with a length of 5.
What is the result?

Question60: The following SAS program is submitted:

What new value would be assigned to X if its original value was a missing value?

Question61: Given the data set WORK.EMPDATA:

Which one of the following where statements would display observations with job titles containing the word
'Manager'?

Question62: Which one of the following SAS procedures displays the data portion of a SAS data set?

Question63: Which one of the following SAS DATA steps saves the temporary data set named MYDATA as a
permanent data set?

Question64: A raw data record is listed below:
--------10-------20-------30
1999/10/25
The following SAS program is submitted:
data projectduration;
infile 'file-specification';
input date $ 1 - 10;
run;
Which one of the following statements completes the program above and computes the duration of the
project in days as of today's date?

Question65: The following SAS program is submitted:
proc contents data = sashelp.class varnum; quit;
What does the VARNUM option print?

Question66: The Excel workbook REGIONS.XLSX contains the following four worksheets:
EAST
WEST
NORTH
SOUTH
The following program is submitted:
libname MYXLS pcfiles path='c:\regions.xlsx';
Which PROC PRINT step correctly displays the NORTH worksheet?

Question67: The following SAS program is submitted:
data numrecords;
infile 'file specification';
input@1 patient $15.
relative$ 16-26@;
if relative = 'children' then
input @54 diagnosis $15. @;
else if relative = 'parents' then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step execution?

Question68: Unless specified, which variables and data values are used to calculate statistics in the MEANS
procedure?

Question69: The following SAS program is submitted:
data test;
set chemists;
jobcode = 'Chem2'
then description = 'Senior Chemist';
else description = 'Unknown';
run;
The value for the variable JOBCODE is:
JOBCODE
-------------
chem2
What is the value of the variable DESCRIPTION?

Question70: A raw data file is listed below:
--------10-------20-------30
squash 1.10
apples 2.25
juice 1.69
The following SAS program is submitted using the raw data file above:
data groceries;
infile 'file-specification';
input item $ cost;
run;
Which one of the following completes the program and produces a grand total for all COST values?

Question71: The following SAS SORT procedure step generates an output data set:
proc sort data = sasuser.houses out = report;
by style;
run;
In which library is the output data set stored?

Question72: The following SAS program is submitted:
libname temp 'SAS data library';
data temp.sales;
merge temp.sales
work.receipt;
by names;
run;
The input data files are sorted by the NAMES variable:
What is the result?

Question73: A user-defined format has been created using the FORMAT procedure. How is it stored?

Question74: The following SAS program is submitted:
data WORK.DATE_INFO;
Day="01" ;
Yr=1960 ;
X=mdy(Day,01,Yr) ;
run;
What is the value of the variable X?

Question75: Population is currently at 34,278,400 for country A and is expected to rise at a rate of 2%.
Which DO LOOP will correctly calculate growth rate over the next 10 years beginning in 2012 as shown in
the graphic below?
A:

B:

C:

D:

E:

Question76: The following SAS program is submitted:
data work.test;
array agents{4} $ 12 sales1 - sales4;
run;
Which one of the following represents the variables that are contained in the output data set?

Question77: When SAS encounters a data when reading from a raw data file, which action will occur?

Question78: Given the following code:
proc print data=SASHELP.CLASS(firstobs=5 obs=15);
where Sex='M';
run;
How many observations will be displayed?

Question79: The following SAS program is submitted:
proc sort data = sasuser.houses out = houses;
by style;
run;
proc print data = houses;
run;
Click on the Exhibit button to view the report produced.
style bedrooms baths price
CONDO 2 1.5 80050
3 2.5 79350
4 2.5 127150
2 2.0 110700
RANCH 2 1.0 64000
3 3.0 86650
3 1.0 89100
1 1.0 34550
SPLIT 1 1.0 65850
4 3.0 94450
3 1.5 73650
TWOSTORY 4 3.0 107250
2 1.0 55850
2 1.0 69250
4 2.5 102950
Which of the following SAS statement(s) create(s) the report?

Question80: Given the SAS data set WORK.TEMPS:

The following program is submitted:

Which output is correct?

Question81: The contents of the SAS data set PERM.JAN_SALES are listed below:
VARIABLE NAME TYPE
idnum character variable
sales_date numeric date value
A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The
SALES_DATE values need to be in a MMDDYY10 form.
Which one of the following SAS DATA steps correctly creates this raw data file?

Question82: Which one of the following is true when SAS encounters a data error in a DATA step?

Question83: Given the SAS data set PRICES:
PRICES
prodid price
K12S 5.10 producttype
NETWORK sales
15 returns
2
B132S 2.34 HARDWARE 300 10
R18KY21.29 SOFTWARE 25 5
3KL8BY 6.37 HARDWARE 125 15
DY65DW 5.60 HARDWARE 45 5
DGTY23 4.55 HARDWARE 67 2
The following SAS program is submitted:
data hware inter soft;
set prices (keep = producttype price);
if price le 5.00;
if producttype = 'HARDWARE' then output HWARE;
else if producttype = 'NETWORK' then output INTER;
else if producttype = 'SOFTWARE' then output SOFT;
run;
How many observations does the HWARE data set contain?

Question84: The following SAS program is submitted:
data test;
infile 'file specification';
input name $ amount@@;
run;
Which of the following is true?

Question85: The following SAS program is submitted:
data work.month;
date = put('13mar2000'd,ddmmyy10.);
run;
Which one of the following represents the type and length of the variable DATE in the output data set?

Question86: Given the SAS data set EMPLOYEES:
EMPLOYEES
NAME SALARY
-------- ------------
Innis 60000
Jolli 50000
Ellis 55000
Liu 45000
The following SAS program is submitted:
proc print data = employees; where name like '_i%';
run;
What is contained in the output?

Question87: The following SAS DATA step executes on Monday, April 25, 2000:
data newstaff;
set staff;
start_date = today();
run;
Which one of the following is the value of the variable START_DATE in the output data set?

Question88:
Given the following SAS log entry:
What caused the error?

Question89: The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently
ordered by Department. The following SAS program is submitted:

Which statement is true?

Question90: The following SAS program is submitted:
libname sasdata 'SAS-data-library';
data test;
set sasdata.chemists;
if jobcode = 'chem3'
then description = 'Senior Chemist';
else description = 'Unknown';
run;
A value for the variable JOBCODE is listed below:
JOBCODE
CHEM3
Which one of the following values does the variable DESCRIPTION contain?

Question91: The following SAS program is submitted:
data work.totalsales;
set work.monthlysales(keep = year product sales);
retain monthsales {12} ;
array monthsales {12} ;
do i = 1 to 12;
monthsales{i} = sales;
end;
cnt + 1;
monthsales{cnt} = sales;
run;
The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a
total of 60 observations.
Which one of the following is the result of the above program?

Question92: Given the contents of the raw data file 'EMPLOYEE.TXT'

Which SAS informat correctly completes the program?

Question93: The following SAS program is submitted:
data work.one;
x = 3;
y = 2;
z = x ** y;
run;
Which one of the following is the value of the variable Z in the output data set?

Question94: The following SAS program is submitted:
data work.products;
Product_Number = 5461;
Item = '1001';
Item_Reference = Item'/'Product_Number;
run;
Which one of the following is the value of the variable ITEM_REFERENCE in the output data set?

Question95: Which one of the following is true of the SUM statement in a SAS DATA step program?

Question96: The following SAS program is submitted:

What is produced as output?

Question97: The following SAS program is submitted once:

Which procedure output will appear in test.html?

Question98: Given the SAS data set WORK.ORDERS:

Ship_date is a numeric variable containing a SAS data value. A programmer would like to create a new
character variable Ship_date-char that represents the ship date as a character string, such as "February
2,2009'
Which statement will create the new variable Ship_date_char as a character value with a format such as
"February 2, 2009"?

Question99: The contents of the raw data file NAMENUM are listed below:
--------10-------20-------30
Joe xx
The following SAS program is submitted:
data test;
infile 'namenum';
input name $ number;
run;
Which one of the following is the value of the NUMBER variable?

Question100: Read the table

The following SAS program is submitted:
proc freq data = sales;
<insert TABLES statement here>
run;
The following output is created by the FREQUENCY procedure:

Which TABLES statement(s) completed the program and produced the output?

Question101: Given the SAS data set WORK.PRODUCTS:

How many variables does the WORK.REVENUE data set contain?

Question102: Which one of the following statements is true regarding the name of a SAS array?

Question103: The following SAS program is submitted:
proc means data = sasuser.houses std mean max;
var sqfeet;
run;
Which one of the following is needed to display the standard deviation with only two decimal places?

Question104: The contents of the raw data file PRODUCT are listed below:
--------10-------20-------30
24613 $25.31
The following SAS program is submitted:
data inventory;
infile 'product';
input idnum 5. @10 price;
run;
Which one of the following is the value of the PRICE variable?

Question105: Given the SAS data set QTR 1_REVENUE:
destination revenue
YYZ 53634
FRA 62129
FRA 75962
RDU 76254
YYZ 82174
The following SAS program is submitted:
proc sort data = qtr1_revenue;
by destination descending revenue; run;
What is the first observation in the output data set?

Question106: Given the contents of the raw data file EMPLOYEE:
----|----10----|----20----|----30
Alan 19/2/2004 ACCT
Rob 22/5/2004 MKTG
MaryJane 14/3/2004 EDUC
The following SAS program is submitted:
data emps;
infile 'employee';
input@1 name$
@ 15 date <insert INFORMAT here>
@ 25 department$;
run;
Which INFORMAT correctly completes the program?

Question107: The SAS data set SASUSER.HOUSES contains a variable PRICE which has been assigned a permanent
label of "Asking Price". Which SAS program temporarily replaces the label "Asking Price" with the label
"Sale Price" in the output?

Question108: The following program is submitted:
proc sort data=SASUSER.PROJECTS out=PSORT;
by Code descending Date Cost;
run;
Which of the following is true concerning the submitted program?

Question109: Consider the data step:

Which of the following assignment statements for variable group are functionally equivalent to the original
statement used in the above data step?

Question110: The following SAS program is submitted:
data work.test;
Author = 'Agatha Christie';
First = substr(scan(author,1,' ,'),1,1);
run;
Which one of the following is the length of the variable FIRST in the output data set?

Question111: The following SAS program is submitted:

What is the initial value of the variable Total in the following program?

Question112: The following SAS program is submitted:
libname rawdata1 'location of SAS data library';
filename rawdata2 'location of raw data file';
data work.testdata;
infile
input sales1 sales2;
run;
Which one of the following is needed to complete the program correctly?

Question113: The following SAS program is submitted:
data WORK.AUTHORS;
array Favorites{3} $ 8 ('Shakespeare','Hemingway','McCaffrey');
run;
What is the value of the second variable in the dataset WORK.AUTHORS?

Question114: The following SAS program is submitted:
data work.accounting;
set work.dept1 work.dept2;
jobcode = 'FA1';
length jobcode $ 8;
run;
A character variable named JOBCODE is contained in both the WORK.DEPT1 and WORK.DEPT2 SAS
data sets. The variable JOBCODE has a length of 5 in the WORK.DEPT1 data set and a length of 7 in the
WORK.DEPT2 data set. What is the length of the variable JOBCODE in the output data set?

Question115: The contents of the raw data file SIZE are listed below:
--------10-------20-------30
72 95
The following SAS program is submitted:
data test;
infile 'size';
input @1 height 2. @4 weight 2;
run;
Which one of the following is the value of the variable WEIGHT in the output data set?

Question116: The following SAS program is submitted:
data work.sets;
do until (prod gt 6);
prod + 1;
end;
run;
What is the value of the variable PROD in the output data set?

Question117: This question will ask you to provide a missing format:
Given the contents of the raw data file 'EMPLOYEE.TXT'

Which SAS information correctly completes the program?

Question118: The following SAS program is submitted:
data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAS data set WORKPEOPLE has 5 observations, and the data set WORKMONEY has 7
observations. How many observations will the data set WORK.EMPSALARY contain?

Question119: Which step displays a listing of all the data sets in the WORK library?

Question120: The SAS data set WORK.ONE contains a numeric variable named Num and a character variable named
Char:

The following SAS program is submitted:
proc print data=WORK.ONE;
where Num=contains (1);
run;
Which output is generated?

Question121: The following program is submitted:
proc contents data=_all_;
run;
Which statement best describes the output from the submitted program?

Question122: Given the raw data file 'DEPENDENTS.TXT':

The following SAS program is submitted:

What will be the value of _ERROR_ in the Program Data Vector for each iteration of the DATA step?
A:

B:

C:

D:

Question123: The following SAS program is submitted:
data work.new;
length word $7;
amount = 4;
it amount = 4 then word = 'FOUR';
else if amount = 7
then word = 'SEVEN';
else word = 'NONE!!!';
amount = 7;
run;
What are the values of the AMOUNT and WORD variables in SAS dataset work.new?

Question124: Which program displays a listing of all data sets in the SASUSER library?

Question125: Given the AIRPLANES data set
AlRPLANES
TYPE MPG
-------- ------
F-18 105
C-130 25
Harrier 75
A-6 110
The following SAS program is submitted:
data gt100;
set airplanes(keep = type mpg load);
load = mpg * 150;
run;
The program fails to execute due to syntax errors.
What is the cause of the syntax error?

Question126: A realtor has two customers. One customer wants to view a list of homes selling for less than $60,000. The
other customer wants to view a list of homes selling for greater than $100,000.
Assuming the PRICE variable is numeric, which one of the following PRINT procedure steps will select all
desired observations?

Question127: The following output is created by the FREQUENCY procedure:

Which TABLES option(s) would be used to eliminate the row and column counts and just see the
frequencies and percents?

Question128: Consider the following data step:

In filtering the values of the variable X in data set WORK.OLD, what value new value would be assigned to
X if its original value was a missing value?

Question129: The contents of the raw data file FURNITURE are listed below:
--------10-------20-------30
chair,,table
chair,couch,table
The following SAS program is submitted:
data stock;
infile 'furniture' dsd;
input item1 $ item2 $ item3 $;
run;
Which one of the following is the value of the variable named ITEM2 in the first observation of the output
data set?

Question130: You're attempting to read a raw data file and you see the following messages displayed in the SAS Log:

What does it mean?

Question131: The following SAS program is submitted:
data _null_;
set old (keep = prod sales1 sales2);
file 'file-specification';
put sales1 sales2;
run;
Which one of the following default delimiters separates the fields in the raw data file created?

Question132: After a SAS program is submitted, the following is written to the SAS log:

What changes should be made to the KEEP statement to correct the errors in the LOG?

Question133: What describes the SAS automatic _ERROR_ variable?

Question134: The data set WORK.REALESTATE has the variable LocalFee with a format of 9. and a variable
CountryFee with a format of 7.;
The following SAS program is submitted:

What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?

Question135: Given the following data step:

After data step execution, what will data set WORK.GEO contain?

Question136: The following SAS program is submitted:
data work.january;
set work.allmonths (keep = product month num_sold cost);
if month = 'Jan' then output work.january;
sales = cost * num_sold;
keep = product sales;
run;
Which variables does the WORK.JANUARY data set contain?

Question137: Given the contents of the raw data file TYPECOLOR.DAT:

The following SAS program is submitted:

What are the values of the variables Type and Color?

Question138: When the following SAS program is submitted, the data set SASDATA.PRDSALES contains 5000
observations:
libname sasdata 'SAS-data-library';
options obs = 500;
proc print data = sasdata.prdsales (firstobs = 100);
run;
options obs = max;
proc means data = sasdata.prdsales (firstobs = 500);
run;
How many observations are processed by each procedure?

Question139: Which statement specifies that records 1 through 10 are to be read from the raw data file customer.txt?

Question140: The following SAS program is submitted:
data WORK.ACCOUNTING;
set WORK.DEPARTMENT;
length EmpId $6;
CharEmpid=EmpId;
run;
If data set WORK.DEPARTMENT has a numeric variable EmpId. Which statement is true about the output
dataset?

Question141: The following SAS program is submitted:
data work.test;
set work.staff (keep = jansales febsales marsales);
array diff_sales{3} difsales1 - difsales3;
array monthly{3} jansales febsales marsales;
run;
What new variables are created?

Question142: The following SAS program is submitted:

What is the result?

Question143: The following SAS program is submitted:
data work.test;
array items{3} _temporary_;
run;
What are the names of the variable(s) in the WORKTEST data set?

Question144: The following SAS program is submitted:

What is the value of the variable Prod in the output data set?